import request from "@/utils/request";

// 查询商城集采账号列表
export function listAccount(query) {
  return request({
    url: "/mall/account/list",
    method: "get",
    params: query,
  });
}

// 查询商城集采账号详细
export function getAccount(id) {
  return request({
    url: "/mall/account/" + id,
    method: "get",
  });
}

// 新增商城集采账号
export function addAccount(data) {
  return request({
    url: "/mall/account",
    method: "post",
    data: data,
  });
}

// 修改商城集采账号
export function updateAccount(data) {
  return request({
    url: "/mall/account",
    method: "put",
    data: data,
  });
}

// 删除商城集采账号
export function delAccount(id) {
  return request({
    url: "/mall/account/" + id,
    method: "delete",
  });
}
//是否可用
export function updateIsUse(data) {
  return request({
    url: "mall/account/updateIsUse",
    method: "put",
    data,
  });
}
